const express = require('express');
const app = express();

app.use((request,response,next)=>{
    response.setHeader('Access-Control-Allow-Origin','*');
    next();
})
app.get('/getData', (request,response)=>{
    response.json({
        code:0,
        msg:'成功'
    })
})

app.listen(8080,()=>{
    console.log('server run at 8080');
})